package com.bigtalk.pattern.flyweight;

public class FlyweightTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int extrinsic_state = 22;
		FlyweightFactory ff = new FlyweightFactory();
		Flyweight f1 = ff.getFlyweight("X");
		f1.operation(--extrinsic_state);
		Flyweight f2 = ff.getFlyweight("Y");
		f2.operation(--extrinsic_state);
		Flyweight f3 = ff.getFlyweight("Z");
		f3.operation(--extrinsic_state);
		
		UnsharedConcreteFlyweight ucf = new UnsharedConcreteFlyweight();
		ucf.operation(--extrinsic_state);
	}

}
